package com.bcxj.servicemap.controller;

import com.bcxj.internalcommon.dto.ResponseResult;
import com.bcxj.servicemap.service.ServiceFromMapService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: ServiceController
 * Package: com.bcxj.servicemap.controller
 * Description:
 *
 * @Author BCXJ
 * @Create 2024/10/31 21:26
 * @Version 1.0
 * @Since 1.0
 */
@RestController
@RequestMapping("service")
public class ServiceController {

    @Autowired
    private ServiceFromMapService serviceFromMapService;

    /**
     * 添加服务
     * @param name
     * @return
     */
    @PostMapping("/add")
    public ResponseResult add(@RequestParam String name) {
        return serviceFromMapService.add(name);
    }

}
